package com.wicket.okrapp.integration.dto;

import com.wicket.okrapp.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Objects;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * @desc ProcessExceuteCycleStageDto
 * @使用场景
 */
@Data
public class ProcessExceuteCycleStageDto
  extends BaseDto
  implements Serializable {

  /**
   * 被评对象目标周期ID
   */
  @NotNull(message = "被评对象目标周期ID不能为空")
  @ApiModelProperty("被评对象目标周期ID")
  private String evaObjTargetCycleId;

  /**
   * 周期ID
   */
  @NotNull(message = "周期ID不能为空")
  @ApiModelProperty("周期ID")
  private String cycleId;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    ProcessExceuteCycleStageDto that = (ProcessExceuteCycleStageDto) o;
    return (
      evaObjTargetCycleId == that.evaObjTargetCycleId && cycleId == that.cycleId
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(super.hashCode(), evaObjTargetCycleId, cycleId);
  }

}
